package stringbuilder;

public class StringBuilderDemo {

    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder("hello,");
        StringBuilder temp = sb;

        sb.append("world");

        System.out.println(sb.toString());
        System.out.println(temp == sb); //true,说明改变字符串内容后，sb引用并没有指向新对象。


    }
}
